package com.atfeng.core.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.atfeng.core.bean.TestTb;
import com.atfeng.core.dao.TestTbDao;

@Service
@Transactional //事务标签在类头上，表示整个类的方法都有事务。如果某个类不想有事务，可以在方法上加@Transactional(readOnly=true)
public class TestTbServiceImpl implements TestTbService{
	
	@Autowired
	private TestTbDao testTbDao;

	@Override	
	public void insertTestTb(TestTb testTb) {
		testTbDao.insertTestTb(testTb);
//		throw new RuntimeException();
	}

}
